﻿using System;
using System.Collections.Generic;
using System.Text;
using SalonPay.IBLL;
using SalonPay.Entity;
using System.Threading;
using SalonPay.BLL;
namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.ReadLine();
            int j = 1;
            //while (true)
            //{
                for ( i = 0; i < 100; i++)
                {
                    ThreadStart ts = new ThreadStart(test);
                    Thread t = new Thread(ts);
                    t.Start();
                    Thread.Sleep(10);
                    Console.WriteLine(j.ToString());
                    j++;
                }

            //}
                //test();
                //IOrder orderObj = RemotingHelper.OrderService();

                

                ////IUser userObj = RemotingHelper.UserService();

                ////bool b = orderObj.UpdateOrderStatus_Payed("20100205180148156");
                ////tb_Order orderInfo = orderObj.GetOrderById("20100129133503");

                ////Order orderBll = new Order();
                //tb_Order orderInfo = orderObj.GetChargedFailOrder();
                //string s = DateTime.Now.ToString("yyyyMMddHHmmssfff");


                //tb_Order orderInfo1 = orderObj.GetOrderById("20100205184548765");

                //Console.WriteLine(orderObj.Charge(orderInfo1));

                Console.ReadLine();

            
        }
        public static int i = 0;
        private static void test()
        {
            int ji = i;
            IUser userObj = RemotingHelper.UserService();
            string s = userObj.CheckUserName("aaaa" + ji);
            Console.WriteLine("aaa" + ji + ">>" + s);
            //IOrder orderObj = RemotingHelper.OrderService();
            //IUser userObj = RemotingHelper.UserService();

            //tb_UserInfo userInfo = new tb_UserInfo();

            //userInfo.UBankArea = "111";
            //userInfo.UBankCard = "111";
            //userInfo.UBankName = "1111";
            //userInfo.UBankType = "111";
            //userInfo.UCountry = "1111";
            //userInfo.UDrawPwd = "1111";
            //userInfo.UEmail = "1111";
            //userInfo.UGender = 1;
            //userInfo.UMsn = "111";
            //userInfo.UQQ = "1111";
            //userInfo.URegDate = DateTime.Now;
            //userInfo.URegIp = "192.168.0.100";
            //userInfo.UserName = "test222";
            //userInfo.UserPwd = "1111";
            //userInfo.USkype = "111";
            //userInfo.UTeleContent = "111";
            //userInfo.UTeleType = 1;
            //userInfo.UTelNum = "111";
            //userInfo.UTrueName = "111";

            //string s = userObj.CheckUserName("test123");
            //Console.WriteLine(s);


            //bool b = userObj.InsertUser(userInfo);
            //Console.WriteLine(userObj.Register(userInfo));


            //tb_Order order = new tb_Order();
            //order.OAmount = 1;
            //order.OEmail = "";
            //order.OLanguage = 1;
            //order.OMemoText = "";
            //order.OMoneyType = "1";
            //order.OPayDate = DateTime.Now;
            //order.OPayGateWayType = 1;
            //order.OPayIP = "";
            //order.OPayType = 1;
            //order.OPhone = "";
            //order.OrderID = DateTime.Now.ToString("yyyyMMddHHmmss");//"20100125204235";//
            //order.OTrueName = "";
            //order.OUserName = "linwu";

            //bool result = orderObj.AddOrder(order);

            //Console.WriteLine(orderObj.Charge(order));
        }
    }
}
